package com.softeem.dao;

import com.softeem.bean.Book;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface BookDao {

    public int addBook(Book book) throws SQLException;

    public int deleteBookById(Integer id) throws SQLException;

    public int updateBook(Book book) throws SQLException;

    public Book queryBookById(Integer id) throws SQLException;

    public List<Book> queryBooks() throws SQLException;

    public Integer queryForPageTotalCount() throws SQLException;

    public List<Book> queryForPageItems(int begin, int pageSize) throws SQLException;

    public Integer queryForPageTotalCount(String name, String author, Double min , Double max) throws SQLException;

    public List<Book> queryForPageItems(int begin, int pageSize,String name, String author, Double min , Double max) throws SQLException;

    public Book queryBookByNameAndPrice(String name, Double price) throws SQLException;
}